package com.baoyouqun.service;

import com.alibaba.cola.dto.Response;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baoyouqun.domain.cmd.UserRoleCmd;
import com.baoyouqun.entity.UserRole;

import java.util.List;
import java.util.Map;


public interface UserRoleService extends IService<UserRole> {

    Response assignRoles(UserRoleCmd cmd);

    List<String> selectByUserId(String userId);

    /**
     * 批量查询用户的角色ID列表
     *
     * @param userIds 用户ID列表
     * @return key:用户ID, value:角色ID列表
     */
    Map<String, List<String>> selectByUserIds(List<String> userIds);

    String getRoleIdByUserId(String userId);

    void deleteByUserId(String id);
}